package com.wood.life.service.Impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.night.common.entity.life.Answer;

import com.wood.life.mapper.AnswerMapper;
import com.wood.life.service.AnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: dz
 * 2022-10-18-20:57
 */
@Service
public class AnswerServiceImpl implements AnswerService {
    @Autowired
    AnswerMapper answerMapper;

    @Override
    public void add(Answer answer) {
        answerMapper.insert(answer);
    }

    @Override
    public List<Answer> getByCondition(Answer answer) {
        return answerMapper.getByCondition(answer);
    }



    @Override
    public Answer getById(Integer id) {
        return answerMapper.getById(id);
    }

    @Override
    public List<Answer> getByQId(Integer qid) {
        return answerMapper.getByQId(qid);
    }

    @Override
    public void updateById(Answer answer) {
        answerMapper.updateById(answer);
    }

    @Override
    public void deleteById(Integer id) {
        answerMapper.deleteById(id);
    }
}
